a5613b6ad885c4a27b99cdfa3695318c7ce84273,testsuite/integration/ws/src/test/java/org/jboss/as/test/integration/ws/serviceref/ServiceRefTestCase.java,ServiceRefTestCase,deployment,#,70

Before Change


        final Properties properties = new Properties();
        properties.putAll(System.getProperties());
        if(properties.containsKey("node0")) {
            properties.put("node0", NetworkUtils.formatPossibleIpv6Address((String)properties.get("node0")));
        }
        return ShrinkWrap.create(JavaArchive.class, "ws-serviceref-example.jar")
                .addClasses(EJB3Bean.class, EndpointInterface.class, EndpointService.class, StatelessBean.class, StatelessRemote.class, CdiBean.class)

After Change


    public static JavaArchive deployment() {
        String wsdl = FileUtils.readFile(ServiceRefTestCase.class, "TestService.wsdl");

        final Properties properties = new Properties();
        properties.putAll(System.getProperties());
        final String node0 = NetworkUtils.formatPossibleIpv6Address((String)properties.get("node0"));
        if(properties.containsKey("node0")) {
            properties.put("node0", node0);
        }
        return ShrinkWrap.create(JavaArchive.class, "ws-serviceref-example.jar")
                .addClasses(EJB3Bean.class, EndpointInterface.class, EndpointService.class, StatelessBean.class, StatelessRemote.class, CdiBean.class)
                .addAsManifestResource(ServiceRefTestCase.class.getPackage(), "ejb-jar.xml", "ejb-jar.xml")
                .addAsManifestResource(ServiceRefTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml")
                .addAsManifestResource(new StringAsset(PropertiesValueResolver.replaceProperties(wsdl, properties)), "wsdl/TestService.wsdl")
                .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
                // all the following permissions are needed because EndpointService directly extends javax.xml.ws.Service class
                // and CXF guys are not willing to add more privileged blocks into their code, thus deployments need to have
                // the following permissions (note that the wsdl.properties permission is needed by wsdl4j)
                .addAsManifestResource(createPermissionsXmlAsset(
                        new FilePermission(System.getProperty("java.home") + File.separator + "lib" + File.separator + "wsdl.properties", "read"),
                        new PropertyPermission("user.dir", "read"),
                        new RuntimePermission("getClassLoader"),
                        new RuntimePermission("org.apache.cxf.permission", "resolveUri"),
                        new RuntimePermission("createClassLoader"),
                        new RuntimePermission("accessDeclaredMembers"),
                        new SocketPermission(node0 + ":8080", "connect,resolve")
                ), "jboss-permissions.xml");
    }

    @Test